import request from "@/axios";
// 基于和风天气开发者平台
interface Weather {
    location: string | number // 城市
}
const key = "4d3239b0e0f64cec8e21fbdba90e28d2"
// 获取三天的天气预报
export const getWeatherInfo = (query: Weather) => {
    const { location } = query

    return request({
        method: "get",
        url: `https://devapi.qweather.com/v7/weather/3d?location=${location}&key=${key}`,
    })
}

// 获取所有的城市列表
export const getCityList = () => {
    return request({
        baseURL:"",
        method: "get",
        url: `/src/assets/city.json`
    })
}